import { BasicFetchResult } from '/@/api/model/baseModel';

export interface SceneListItem {
  scenarioName: string;
  id: string;
  appName: string;
  tenantName: string;
}

export type SceneResultModel = BasicFetchResult<SceneListItem>;

export interface AppItem {
  appId: string;
  appName: string;
}

export interface TenantItem {
  tenantName: string;
  tenantCode: string;
}

export type TenantResult = BasicFetchResult<TenantItem[]>;

export type SceneParamItem = {
  key: string;
  headerKey: string;
  headerMatch: string;
  headerValue: string;
};

export interface SceneDetailItem {
  sceneId: string;
  sceneName: string;
  appName: string;
  description: string;
  tenantName: string;
  requestMethod: string;
  apiPath: string;
  headers: SceneParamItem[];
}

export type ScenePageParam = {
  current: number;
  size: number;
  appId: string;
  tenantCode: string;
};

export type AppIdParam = {
  appId: string;
};

export type TenantCodeParam = {
  tenantCode: string;
};

export type PageParams = {
  appId: string;
  tenantCode: string;
};

export type CreateScenePageParam = {
  scenarioName: string;
  appId: string;
  description: string;
  tenantCode: string;
  requestMethod: string;
  apiPath: string;
  scenarioId: string;
  appName: string;
  tenantName: string;
  headers: SceneParamItem[];
};

export type EditScenePageParam = {
  id: string;
  scenarioName: string;
  appId: string;
  description: string;
  tenantCode: string;
  requestMethod: string;
  apiPath: string;
  scenarioId: string;
  appName: string;
  tenantName: string;
  headers: SceneParamItem[];
};

export type ViewScenePageParam = {
  scenarioId: string;
};

export type DeleteScenePageParam = ViewScenePageParam;
